<style>
	.index-forum.news img { width:100%; border-radius:4px; }
	.index-forum.news .news_l_i { padding:0 0 25px 0; }
	.index-forum.news .news_l_i .ts { padding:10px 8px; color:#333; border-radius:4px; background-color:#fff; }
	.index-forum.news .news_l_i p.tt { margin:0 0 10px 0; font-weight:700; font-size:16px; }
	.index-forum.news .news_l_i:hover { opacity: 0.9; }
	.index-forum.news .news_l {
		-moz-column-count:3; /* Firefox */
		-webkit-column-count:3; /* Safari 和 Chrome */
		column-count:3;

		-moz-column-gap:15px; /* Firefox */
		-webkit-column-gap:15px; /* Safari 和 Chrome */
		column-gap:15px;
	}
	@media (max-width: 970px) {
		.index-forum.news .news_l {
			-moz-column-count:2; /* Firefox */
			-webkit-column-count:2; /* Safari 和 Chrome */
			column-count:2;
		}
	}
</style>
<div class="container">
	<div class="row clearfix">
		<ol class="breadcrumb forum-breadcrumb">
			<li><a href="?c=forum"><span class="glyphicon glyphicon-home"></span> 首页</a></li>
			<li class="active"><img src="img/finance/hengxin_logo_sm_1.png" height="25px"> 推新闻 <small>>></small></li>
		</ol>
	</div>
</div>
<div class="container index-forum">
	<h3 class="hidden-xs"><a href="#"><img src="img/finance/hengxin_logo_sm_1.png" height="25px"> 推新闻 <small>>></small></a></h3>
</div>
<div class="container index-forum news"> </div>
<script>

var news = [];
for (i=0; i <= 32 ;i++) {
	news[i] = {'ch':i,'of':0}; 
}

get_news_list();
$(window).scroll(function(){ if (700 > $('div.news').height() - $('body').scrollTop()) { get_news_list(); } }); 
$('li#index_news').addClass('active');

function get_news_list() {
	ns = news[Math.floor(Math.random()*(news.length))];
	$.ajax({
		type : 'get',
			url : 'http://j.news.163.com/hy/newshot.s?deviceid=61b60a26ee7f5b6d81327f56664163cd&channel='+ns.ch+'&offset='+(ns.of++)*10+'&limit=10',
			dataType : 'jsonp',
			success : function(rs){
				$('div.news').append('<div class="news_l"></div>');
				for (r in rs) {
					doc_url = (rs[r].doc_url) ? rs[r].doc_url : 'http://j.news.163.com'+rs[r].url_163;
					ns_item = '<div class="news_l_i"><a target="_blank" href="'+doc_url+'">';
					p_u = eval(rs[r].pic_url);
					if (p_u) ns_item += '<img src="http://s.cimg.163.com/i/'+p_u[0].url.replace('http://', '')+'.430x10000.auto.jpg"/>';
					ns_item += '<div class="ts"><p class="tt">'+rs[r].title+'</p><p>'+rs[r].summary+'</p></div></a></div>';
					$('div.news_l:last').append(ns_item);
				}
			}
	});
}
</script>
